import React from 'react'
import { useLocation } from 'react-router-dom'
import { Tabs ,Descriptions } from 'antd';
import type { TabsProps } from 'antd';
import Details1 from './Details1';
import Record from './Record';

interface IProps{
 id:string,
 send:()=>void
}

export default function Details({id,send}:IProps) {
    let $route=useLocation()
 

   const onChange = (key: string) => {
    console.log(key);
  };
  
  const items: TabsProps['items'] = [
    {
      key: '1',
      label: `健康档案`,
      children:<Details1 id={id} send={send}/>,
    },
    {
      key: '2',
      label: `健康记录`,
      children: <Record id={id}/>,
    },
    {
      key: '3',
      label: `签约信息`,
      children: `Content of Tab Pane 3`,
    },
    {
      key: '4',
      label: `服务记录`,
      children: `Content of Tab Pane 4`,
    },
  ];
    
  return (
    <div>
        <Tabs defaultActiveKey="1" items={items} onChange={onChange} />
    </div>
  )
}
